<template>
    <div class="platform-page page">
        <div class="content">
            <PlatformCrumb back="对账">
            </PlatformCrumb>
            <div class="table">
                <el-table
                        :header-cell-style="{background:'#F7F7F7',color:'#333333'}"
                        ref="multipleTable"
                        :data="list"
                        stripe
                        tooltip-effect="dark"
                        style="width: 100%"
                >
                    <el-table-column align="center" prop="time" label="日期" show-overflow-tooltipv></el-table-column>
                    <el-table-column align="center" prop="monthTime" label="名称" show-overflow-tooltip></el-table-column>
                    <el-table-column align="center" prop="moneySum" label="合计" show-overflow-tooltip></el-table-column>
<!--                    <el-table-column prop="operation" label="操作" show-overflow-tooltip>-->
<!--                        <template slot-scope="scope">-->
<!--                            <span @click="goView(scope.row.time)">查看详情</span>-->
<!--                        </template>-->
<!--                    </el-table-column>-->
                </el-table>
                <div class="pagination">
                    <el-pagination background :page-size="pageSize" layout="total, prev, pager, next"
                                   :total="total"></el-pagination>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    import PlatformCrumb from "@/components/PlatformCrumb.vue";
    import {getRecordList} from '../../api/api/platform.js';
    import {baseImgPath, basefile} from '@/config/env.js';

    export default {
        components: {
            PlatformCrumb,
        },
        created() {
            this.getRecordList()
        },
        data() {
            return {
                search: '',
                options: [],
                value: "",
                tableData: [],
                multipleSelection: [],
                list: [],
                total: 0,
                pageSize: 10,
                pageNum: 1

            };
        },
        methods: {
            handleClick(row) {
                console.log(row);
                this.getRecordList()
            },
            handleSizeChange(val) {
                this.pageSize = val
                this.getRecordList()
            },
            handleCurrentChange(val) {
                this.pageNum = val
                this.getRecordList()
            },
            goView(e){
                console.log(e);
            },

            getRecordList() {
                getRecordList({
                    "pageNum": this.pageNum,
                    "pageSize": this.pageSize,
                }).then(res => {
                    this.list = res.data.list
                    this.total = res.data.total
                });
            }
        },
    };
</script>

<style lang="less" scoped>
    @import url("platform.less");

    .operation {
        margin-right: 25px;
    }
</style>
